package nowcoder.huawei;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Scanner;

/**
 * @author wuguojian
 * @description
 * @date 2023/4/12 下午9:46
 * https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
 **/
public class HJ9 {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner(new FileReader("input/nowcoder_huawei/HJ9.txt"));
//        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String s = in.next();
            String result = "";
            char[] chars = s.toCharArray();
            for (int i = chars.length - 1; i >= 0; i--) {
                if(result.contains(String.valueOf(chars[i]))){
                    continue;
                }
                result += chars[i];
            }
            System.out.println(result);
        }
    }
}
